.class public Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;
.super Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;
.source "ActivityOfferWebClient.java"


# instance fields
.field private mShouldHostActivityStayOpen:Z


# direct methods
.method public constructor <init>(Landroid/app/Activity;Z)V
    .locals 0
    .parameter "hostActivity"
    .parameter "shouldStayOpen"

    .prologue
    .line 25
    invoke-direct {p0, p1}, Lcom/sponsorpay/sdk/android/publisher/OfferWebClient;-><init>(Landroid/app/Activity;)V

    .line 26
    iput-boolean p2, p0, Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;->mShouldHostActivityStayOpen:Z

    .line 27
    return-void
.end method


# virtual methods
.method protected onSponsorPayExitScheme(ILjava/lang/String;)V
    .locals 5
    .parameter "resultCode"
    .parameter "targetUrl"

    .prologue
    .line 31
    invoke-virtual {p0}, Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;->getHostActivity()Landroid/app/Activity;

    move-result-object v0

    .line 33
    .local v0, hostActivity:Landroid/app/Activity;
    if-nez v0, :cond_1

    .line 55
    :cond_0
    :goto_0
    return-void

    .line 37
    :cond_1
    invoke-virtual {v0, p1}, Landroid/app/Activity;->setResult(I)V

    .line 38
    const/4 v1, 0x0

    .line 40
    .local v1, willCloseHostActivity:Z
    if-nez p2, :cond_3

    .line 41
    const/4 v1, 0x1

    .line 49
    :cond_2
    const-string v2, "OfferWebClient"

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Should stay open: "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-boolean v4, p0, Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;->mShouldHostActivityStayOpen:Z

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    .line 50
    const-string v4, ", will close activity: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 49
    invoke-static {v2, v3}, Lcom/sponsorpay/sdk/android/utils/SponsorPayLogger;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 52
    if-eqz v1, :cond_0

    .line 53
    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    goto :goto_0

    .line 43
    :cond_3
    iget-boolean v2, p0, Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;->mShouldHostActivityStayOpen:Z

    if-eqz v2, :cond_4

    const/4 v1, 0x0

    .line 44
    :goto_1
    invoke-virtual {p0, p2}, Lcom/sponsorpay/sdk/android/publisher/ActivityOfferWebClient;->launchActivityWithUrl(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_2

    goto :goto_0

    .line 43
    :cond_4
    const/4 v1, 0x1

    goto :goto_1
.end method

.method protected onTargetActivityStart(Ljava/lang/String;)V
    .locals 0
    .parameter "targetUrl"

    .prologue
    .line 65
    return-void
.end method

.method protected processSponsorPayScheme(Ljava/lang/String;Landroid/net/Uri;)V
    .locals 0
    .parameter "host"
    .parameter "uri"

    .prologue
    .line 60
    return-void
.end method
